home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / add_cs / add_cs.doc < prev   
Text File  |  1987-07-31  |  3KB  |  69 lines

  1. Note:  This file MUST accompany add_cs.c.
  2.  
  3. This archive contains the following files:
  4.  
  5.   add_cs.c
  6.   add_cs.doc
  7.  
  8. If you use the TurboC TCC C compiler, you have probably noticed the
  9. -S option which allows you compile a C source file into its
  10. 'equivalent' assembly language source program.  Interspersed in this
  11. assembly language file are comments which indicate which lines in the
  12. original C source file are being processed.  This program replaces
  13. the line numbers with the actual C source statements to which they
  14. correspond.  The result is an assembly language listing with C source
  15. statements placed to indicate the assembly code being generated for
  16. the particular C code sequence.  Such a listing is useful for
  17. learning assembly language programming, evaluating code generation
  18. efficiency and other applications.
  19.  
  20. Rather than providing you with an executable module, I am releasing
  21. the source code.  Since no two programmers want the same features,
  22. you can customize the program so that you 'can have it your way.' 
  23. The only thing that I ask is that it NOT be used for commercial
  24. ventures of ANY kind.  No amount of modification and/or rewrite of
  25. the source code will allow you to consider the resultant source code
  26. to be your property.
  27.  
  28. Compile this program using using TurboC.  Although it should make no
  29. difference, consider compiling it with the small model.
  30.  
  31. Using the program is quite easy.  You must have a C source file and
  32. an assembly language source listing of the compiled C source file
  33. (generated using TCC).  By executing add_cs.exe with NO command line
  34. arguments, you will receive instructions on how to use the program.
  35.  
  36. To use the program, type
  37.  
  38.   add_cs xx.c xx.asm xx.asc
  39.  
  40. at the DOS command prompt (or use a batch file if you wish to
  41. automate the process).  xx.c is the name of the C source file that
  42. was compiled to an .asm file using TCC.  xx.asm is the name of the
  43. assembly language file generated from xx.c by TCC.  xx.asc is the new
  44. file which contains the assembly language program mixed with the C
  45. source inserted as comments.  You MUST include the extensions with
  46. the filenames.
  47.  
  48. If any of the input files (xx.c, xx.asm) cannot be opened, the
  49. program aborts with the appropriate message.  If the output file
  50. (xx.asc) cannot be opened or if it already exists, the program aborts
  51. with the appropriate message.  If the C source file (xx.c) empties
  52. prematurely, an appropriate message is issued and the destination
  53. file (xx.asc) is deleted from the directory.  During operation, the
  54. program prints a period (.) for each comment (comments indicate line
  55. number in the C source file) in the assembly language file that is
  56. processed.  The original input files are NOT modified in any way.
  57.  
  58. Enjoy!
  59.  
  60.         Eugene J. Alm
  61.         12145 West Luther Court
  62.         Hales Corners, Wisconsin, 53130
  63.  
  64.  
  65. Copyright 1987 by Eugene J. Alm.  All rights reserved.
  66.  
  67.  
  68.  
  69.